/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package simhya.matheval.operator;

/**
 *
 * @author Luca
 */
public class Equal extends OperatorDefinition {

    public Equal() {
        super("==");
    }

    public double compute(double x) {
        throw new UnsupportedOperationException("Operator " + symbol + " is binary");
    }
    public double compute(double x, double y) {
        if (x == y)
            return 1.0;
        else return 0.0;
    }

}
